var express = require('express');
var router = express.Router();
const $util=require('../util/util');

/* GET home page. */
router.get('/', function(req, res, next) {
	res.render('index');
}).get('/good', function(req, res, next) {
	res.render('index');
}).get('/store', function(req, res, next) {
	res.render('index');
}).get('/thai', function(req, res, next) {
	res.render('index');
});


router.use(function(req, res, next) {
  console.log('time: ', new Date());
  next();
});

//用户创建菜单
router.get('/wechat/create_menu', function(req, res, next) {

	$util.getAccesstoken(req.query, function(err, ret) {
		res.send({
			status: true,
			data: null,
			msg: '获取成功'
		});
		res.end();
	});

});

module.exports = router;
